{% extends "article/base.html" %}

{% load staticfiles %}

{% block title %}
    articles list
{% endblock %}

{% block content %}
    <div>
        <header>
            <h1>{{ article.title }}</h1>
            <p>{{ user.username }}</p>
        </header>
        <link rel="stylesheet" href="{% static 'css/editormd.preview.css' %}">
        <div id="editormd-view">
    <textarea name="" id="append-text" style="display: none;">
        {{ article.body }}
    </textarea>
        </div>
    </div>
    <script src="{% static 'js/jquery.min.js' %}"></script>
    <script src="{% static 'lib/marked.min.js' %}"></script>
    <script src="{% static 'lib/prettify.min.js' %}"></script>
    <script src="{% static 'lib/raphael.min.js' %}"></script>
    <script src="{% static 'lib/underscore.min.js' %}"></script>
    <script src="{% static 'lib/sequence-diagram.min.js' %}"></script>
    <script src="{% static 'lib/flowchart.min.js' %}"></script>
    <script src="{% static 'lib/jquery.flowchart.min.js' %}"></script>
    <script src="{% static 'editormd.js' %}"></script>
    <script type="text/javascript">
    $(function () {
        editormd.markdownToHTML("editormd-view", {
            htmlDecode : "style,script,iframe",
            emoji:true,
            taskList:true,
            tex:true,
            flowChart:true,
            squenceDiagram:true
        });
    });
    </script>
{% endblock %}